<!DOCTYPE HTML>
<html>
<head lang="zh-CN">
    <meta charset="UTF-8">
    <title>公告详情</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- 设置初始缩放比例为1.0，使用设备宽度  -->
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <!-- 在iOS下开启全屏模式  -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <!-- 隐藏 Sarafi 状态栏  -->
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" type="text/css" href="../../css/wapReset.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/mui.min.css"/>
    <script src="../../js/mui.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../js/jquery.rem.min.js"></script>
    <style type="text/css">
    	.notice_cont{
    		width:12rem;
    		margin-top:2.7rem;
    		margin:2.7rem auto 0 auto
    	}
    	.notice_cont h2{
    		font-size: 0.782rem;
    		font-weight: bold;
    		text-align: center;
    		padding-top:1.8rem;
    		padding-bottom:1.8rem;
    	}
    	.notice_cont img{
    		display: block;
    		width:100%;
    		margin-top:0.5rem;
    		margin-bottom:0.5rem;
    	}
    </style>
</head>
<body>
<header class="mui-bar mui-bar-nav message_head">
	<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	<h1 class="mui-title">公告详情</h1>
</header>	
<div class="nullAct">
  <img src="../images/nullAct.png">
  <p>读取错误，请稍后重试</p>
</div>
<div id="mainBox">
  <ul>
    <li class="notice_cont">
    </li>
  </ul>
</div>
</body>
<script type="text/javascript" src="../../js/tokenUser.js"></script>
<script type="text/javascript">
$(".nullAct").css("display","block");
var nid = location.href.split("nid=")[1];
$.ajax({
  type:"GET",
  url:"http://120.76.201.26:8088/msg/noticeDetail",
  data:{
    nid:nid
  },
  success:function(e){
    $(".notice_cont").empty();
    if(e.data.desc.length){
      $(".nullAct").css("display","none")
      for (var i=0; i<e.data.desc.length;i++) 
      {
        if(e.data.desc[i].img_url){
          var html='<p>'+e.data.desc[i].notice_desc+'</p><img src="'+e.data.desc[i].img_url+'">'
        }else{
          var html='<p>'+e.data.desc[i].notice_desc+'</p>'
        }
        $(".notice_cont").append(html)
      }
    }else{
      $(".nullAct").css("display","block");
    }
    $(".notice_cont").prepend("<h2>"+e.data.title+"</h2>")
  }
})
</script>
<link rel="stylesheet" type="text/css" href="../../css/personal.css"/>
</html>